<template>
	<div>
	<table width="800" height="50" border="1"cellspacing="0">
		<tr>
			<th>编号</th>
			<th>姓名</th>
			<th>年龄</th>
			<th>性别</th>
			<th colspan="2">操作</th>
		</tr>
		<tr width="800" height="50" v-for="(item,index) in persons" >
			<td>{{item.id}}</td>
			<td>{{item.name}}</td>
			<td>{{item.age}}</td>
			<td>{{item.sex}}</td>
			<td align="center">
				<button @click="del(index)">删除</button>
			</td>
			<td align="center">
				<button @click="$emit('getindex',index)">更新</button>
			</td>
		</tr>
	</table>
	</div>
</template>

<script>
	export default{
		name:"Test1",
		props:["persons"],
		data:function(){
			return{
				
			}
		},
		methods:{
			
		}
	}
</script>

<style>
</style>